package com.zhao.query.srv;

import com.alibaba.dubbo.config.annotation.Reference;
import com.zhao.message.api.MessageDubboService;
import com.zhao.query.api.QueryDubboService;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created on 2019/8/15.
 *
 * @author zhao
 * @email 136689260@qq.com
 */
@Component
public class QueryDubboServiceImpl implements QueryDubboService {

    @Reference(lazy = true, check = false)
    private MessageDubboService messageDubboService;

    @Override
    public String queryDubbo(String message) {
        return messageDubboService.messageDubbo(message);
    }

    @Override
    public List<Map<String, Object>> testCollect(List<Map<String, Object>> mapList) {
        Map<String, Object> map = new HashMap<>();
        map.put("abc", 1);
        mapList.add(map);
        return mapList;
    }
}
